package com.cbtx.networklib.encrypt

import com.cbtx.networklib.exception.CryptoFailedException

/**
 * author : joker.peng
 * e-mail : joker@fiture.com
 * date   : 2021/7/1 9:53 AM
 * desc   : 加密接口
 */
interface CryptoService {
    /**
     * 对密文进行解密
     *
     * @param cipherText 密文数据
     * @return
     */
    @Throws(CryptoFailedException::class)
    fun decrypt(cipherText: String): String

    /**
     * 对明文进行加密
     *
     * @param plainText 明文数据
     * @return
     */
    @Throws(CryptoFailedException::class)
    fun encrypt(plainText: String?): String?
}